// 坐标类(x轴，y轴)图表通用属性

module.exports = {
  seriesIsRow: {
    type: Boolean,
    default: false,
    name: '行列互换',
    filedType: 'switch'
  },

  // 坐标轴
  xAxisType: {
    type: String,
    default: 'category',
    name: 'X轴类型',
    filedType: 'select',
    options: [
      {
        name: 'value',
        value: 'value'
      },
      {
        name: 'category',
        value: 'category'
      },
      {
        name: 'log',
        value: 'log'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },
  yAxisType: {
    type: String,
    default: 'value',
    name: 'Y轴类型',
    filedType: 'select',
    options: [
      {
        name: 'value',
        value: 'value'
      },
      {
        name: 'category',
        value: 'category'
      },
      {
        name: 'log',
        value: 'log'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },
  yAxisNumber: {
    type: String,
    default: '1',
    name: 'Y轴数',
    filedType: 'select',
    options: [
      {
        name: '1条',
        value: '1'
      },
      {
        name: '2条',
        value: '2'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },

  showX: {
    type: Boolean,
    default: true,
    name: '显示X轴',
    filedType: 'switch'
  },

  showY: {
    type: Boolean,
    default: true,
    name: '显示Y轴',
    filedType: 'switch'
  },

  showXLine: {
    type: Boolean,
    default: true,
    name: '显示X轴线',
    filedType: 'switch'
  },

  showYLine: {
    type: Boolean,
    default: true,
    name: '显示Y轴线',
    filedType: 'switch'
  },

  boundaryGap: {
    type: Boolean,
    default: true,
    name: '坐标轴留白',
    filedType: 'switch'
  },

  showSplitLine: {
    type: Boolean,
    default: true,
    name: '显示分隔线',
    filedType: 'switch'
  },

  axisLineColor: {
    type: String,
    default: '#d1d1d9',
    name: '轴线颜色',
    filedType: 'color'
  },

  axisLabelColor: {
    type: String,
    default: '#666',
    name: '轴线刻度颜色',
    filedType: 'color'
  },
  axisLabelFontSize: {
    type: String,
    default: '12',
    name: '轴线刻度字体',
    filedType: 'string'
  },

  splitLineColor: {
    type: String,
    default: '#d1d1d9',
    name: '分隔线颜色',
    filedType: 'color'
  },

  yLabel: {
    type: String,
    default: '',
    name: '坐标轴单位',
    filedType: 'string'
  },

  xName: {
    type: String,
    default: '',
    name: 'X坐标轴标题',
    filedType: 'string'
  },

  yName: {
    type: String,
    default: '',
    name: 'Y坐标轴标题',
    filedType: 'string'
  },

  nameStyleColor: {
    type: String,
    default: '',
    name: '坐标轴标题颜色',
    filedType: 'color'
  },

  nameStyleSize: {
    type: String,
    default: '',
    name: '坐标轴标题字体',
    filedType: 'string'
  },

  showYAxisTick: {
    type: Boolean,
    default: true,
    name: '显示Y坐标刻度',
    filedType: 'switch'
  },

  showXAxisTick: {
    type: Boolean,
    default: true,
    name: '显示X坐标刻度',
    filedType: 'switch'
  },

  useXAxisFun: {
    type: Boolean,
    default: false,
    name: '启用坐标刻度函数',
    filedType: 'switch'
  },
  funcAxisLabel: {
    type: Function,
    default: 'function tmpaxisfunc (value) {let index = -1; if (value.length > 6) {index = 6;}let text = value;if (index > 0) { text = `${text.slice(0, 6)}\n${text.slice(6)}`;} return text;}',
    name: '坐标刻度函数',
    filedType: 'function'
  },

  axisTickInterval: {
    type: String,
    default: 'auto',
    name: '坐标刻度间隔',
    filedType: 'string'
  },

  xNamePadding: {
    type: String,
    default: '',
    name: 'X轴名称位置偏移',
    filedType: 'string'
  },

  yNamePadding: {
    type: String,
    default: '',
    name: 'Y轴名称位置偏移',
    filedType: 'string'
  },
  minInterval: {
    type: String,
    default: '0',
    name: '左坐标轴最小刻度',
    filedType: 'string'
  },
  minIntervalr: {
    type: String,
    default: '0',
    name: '右坐标轴最小刻度',
    filedType: 'string'
  },

  xLabelRotate: {
    type: String,
    default: '0',
    name: 'X坐标旋转角度',
    filedType: 'string'
  },

  yLabelRotate: {
    type: String,
    default: '0',
    name: 'Y坐标旋转角度',
    filedType: 'string'
  },

  showLabel: {
    type: Boolean,
    default: false,
    name: '显示标签',
    filedType: 'switch'
  },

  labelPosition: {
    type: String,
    default: 'top',
    name: '标签位置',
    filedType: 'string'
  },
  labelFontSize: {
    type: String,
    default: '16',
    name: '标签字体',
    filedType: 'string'
  },

  yAxisMin: {
    type: String,
    default: '',
    name: '左Y坐标最小值',
    filedType: 'string'
  },

  yAxisMax: {
    type: String,
    default: '',
    name: '左Y坐标最大值',
    filedType: 'string'
  },

  yAxisSplitNumber: {
    type: String,
    default: '',
    name: '左Y坐标分段数',
    filedType: 'string'
  },

  yAxisMin1: {
    type: String,
    default: '',
    name: '右Y坐标最小值',
    filedType: 'string'
  },

  yAxisMax1: {
    type: String,
    default: '',
    name: '右Y坐标最大值',
    filedType: 'string'
  },

  yAxisSplitNumber1: {
    type: String,
    default: '',
    name: '右Y坐标分段数',
    filedType: 'string'
  },
}
